package com.lp.context;


import com.lp.model.CanalModel;

/**
 * @author yang peng
 * @date 2019/3/2711:17
 */
public class CanalContext {


    private static final ThreadLocal<CanalModel> THREAD_LOCAL = new ThreadLocal<>();


    public static CanalModel getModel() {
        return THREAD_LOCAL.get();
    }


    public static void setModel(CanalModel canalModel) {
        THREAD_LOCAL.set(canalModel);
    }


    public static void removeModel() {
        THREAD_LOCAL.remove();
    }
}
